
const prefixPath: any = process.env.VITE_NUXT_PREFIX_PATH;

export default defineNuxtConfig({
    $development: undefined, $env: undefined, $meta: undefined, $production: undefined, $test: undefined,
    ssr: true,
    devtools:{
        enabled:false
    },
    modules: [
        "@nuxtjs/tailwindcss",
        "@pinia/nuxt",
        "@vueuse/nuxt",
        "@tailvue/nuxt",
        "nuxt-icon",

    ],
    app: {
        head: {title: "Annlcc's Blog"},
        // global transition
        pageTransition: {name: 'page', mode: 'out-in'},
        layoutTransition: {name: 'layout', mode: 'out-in'},
    },

    css: ["@/assets/css/main.less"],
    postcss: {
        plugins: {
            tailwindcss: {},
            autoprefixer: {},
        },
    },
    // router: {},
    // 代理配置说明：官方文档可看到，最新配置请采用这种方式进行代理，devProxy代理只能适用于开发环境，并且刷新页面调用接口时，
    // 不会进行代理，坑！！
    routeRules: {
        [`${prefixPath}/**`]: {
            proxy: {to: `${process.env.VITE_NUXT_BASE_URL}/**`},
        },
    }
});
